/*********************************************
regular expression

*********************************************/
import java.io.Console;
//import java.util.Scanner;

public class Main {
    public static void main(String[] args){


//	Scanner scanner=new Scanner(System.in);
//	String str="abcdefgabcabc";
//	System.out.println(str.replaceAll(".bc","###"));	
//	System.out.println("Pls input cell phone number:");
//	str=scanner.next();
	Console console=System.console();
	String str=console.readLine("input cell phone:");


	//check cell phone number---------------------------------
	if(str.matches("09[0-9]{2}-?[0-9]{6}"))
		System.out.println("\"R\"ight");
	else
		System.out.println("\"F\"alse");

	System.out.println("");
	System.out.println("");

	System.out.println("Pls input email:");
//	str=scanner.next();
	str=console.readLine("input e-mail:");

	//check email---------------------------------
//	if(str.matches("[_a-z0-9-]+([.][_a-z0-9-]+)*@[a-z0-9-]+([.][a-z0-9-])*&"))
	if(str.matches("[_a-z0-9-]+([.][_a-z0-9-]+)*@[a-z0-9-]+([.][a-z0-9-]+)*"))

		System.out.println("\"R\"ight");
	else
		System.out.println("\"F\"alse");


    }
}
